package cn.javastudy.spring._01_依赖注入.service;

import cn.javastudy.spring._01_依赖注入.dao.OrderDAO;
import cn.javastudy.spring._01_依赖注入.dao.UserDAO;

/**
 * 订单服务
 *
 * @author sumou
 * @date 2025/02/18
 */
public class OrderService {

    private OrderDAO orderDAO;

    private UserDAO userDAO;

    public OrderService(OrderDAO orderDAO, UserDAO userDAO) {
        this.orderDAO = orderDAO;
        this.userDAO = userDAO;
    }

    public void delete() {
        this.orderDAO.deleteById();
        this.userDAO.insert();
    }

}
